home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / quote.app < prev    next >
Text File  |  1995-03-23  |  2KB  |  45 lines

  1. Article 1688 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!pur-ee!mentor.cc.purdue.edu!purdue!tut.cis.ohio-state.edu!cs.utexas.edu!hp-sdd!hp-pcd!hpcvra!charliep
  3. From: charliep@hpcvra.CV.HP.COM (Charles Patton)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: Re: Undocumented Functions (HP-48SX)
  6. Message-ID: <21580049@hpcvra.CV.HP.COM>
  7. Date: 30 Mar 90 17:19:00 GMT
  8. References: <53655@microsoft.UUCP>
  9. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  10. Lines: 31
  11.  
  12. The QUOTE and APPLY functions both designed to allow the user additional
  13. control over the evaluation of arguments. The main use for the QUOTE
  14. function is to allow unevaluated names to be passed as arguments as they
  15. are in derivative, for example. If you want to build a Laplace transform
  16. function in user language it would need to use the QUOTE in the input to
  17. the function:
  18.    'Laplace(QUOTE(X^2-A*LN(X)),QUOTE(X))'
  19.  
  20. The APPLY function is useful for creating lazy-evaluation functions and
  21. indefinite streams. Consider, for example, the Infinite Sum Function 
  22.  
  23. ISUM:
  24. << -> Summand Variable StartingValue
  25.    << Summand Variable StartingValue 2 ->LIST |
  26.       Summand Variable StartingValue 1 + 3 ->LIST 'ISUM' APPLY +
  27.    >>
  28. >>
  29.  
  30. This is a recursive definition and without the APPLY to postpone the
  31. continued evaluation, it would never return until it ran out of room.
  32. Instead we have
  33.  
  34. 'ISUM(X^2,X,1)' EVAL => '1+ISUM(X^2,X,2)'
  35. '1+ISUM(X^2,X,2)' EVAL => '1+(4+ISUM(X^2,X,3))' etc.
  36.  
  37. This kind of behavior is very useful for computing with infinite series
  38. and recusive solutions of ordinary differential equations.
  39. *******************************************************
  40. ** charliep@hp-pcd.cv.hp.com     (For Internet hosts)**
  41. ** hplabs!hp-pcd!charliep (For UUCP hosts)           **
  42. *******************************************************
  43.  
  44.  
  45.